# for module compiling
import os
Import('RTT_ROOT')
from building import *

objs = []
cwd  = GetCurrentDir()
list = os.listdir(cwd)

path = [cwd]
src =Glob('*.c')

group1 = DefineGroup('wiota_app1', src, depend = [''], CPPPATH = path)

for d in list:
    path = os.path.join(cwd, d)
    if os.path.isfile(os.path.join(path, 'SConscript')):
        objs = objs + SConscript(os.path.join(d, 'SConscript'))

group = DefineGroup('wiota_app', objs, depend = [''], CPPPATH = [])
objs += group1
Return('objs')
